#ifndef DOCWIDGET_H
#define DOCWIDGET_H

#include <QWidget>
#include <QScrollArea>
#include <QPaintEvent>
#include <QPainter>
#include <QScrollArea>
#include <QScrollBar>
#include <QSplitter>
#include <QVBoxLayout>
#include "childwindow.h"
#include "pdfkit.h"
#include "docview.h"

class ChildWindow;
class DocView;

class DocWidget : public QWidget
{
    Q_OBJECT
public:
    DocWidget(PDFKit *pdf, QWidget *parent = NULL);
    ~DocWidget();


    int page;
    int y;


    QVBoxLayout *mainLayout;
    QWidget *mainWidget;
    QScrollArea *scrollArea;
    QScrollBar *scrollbar;
    PDFKit *pdf;
    DocView *docView;

    void gotoPage(int page);
    int getCurrentPage();
    void changeImageSize(int flag);
    void _resize();
    void refreshWidget();
    void resizeEvent(QResizeEvent *event);
public slots:
//    void page_change(int page);

};

#endif // DOCWIDGET_H
